<?php
/**
 * Created by PhpStorm.
 * User: zhongyb
 * Date: 16-12-26
 * Time: 下午4:17
 */

namespace common\entities\myhtsq;

use common\entities\ContractEntity;
use Yii;

/**
 * This is the model class for table "myscrm_contract_distribution_amount".
 *
 * @property string $amount_id
 * @property string $sign_average_amount
 * @property string $settlement_average_amount
 * @property string $receivable_average_amount
 * @property integer $contract_type
 * @property string $contract_id
 * @property string $user_id
 * @property string $area_id
 * @property string $department_id
 * @property string $CreatedOn
 * @property string $CreatedBy
 * @property string $input_date
 * @property string $modified_on
 * @property integer $is_saas
 */
class MyscrmContractDistributionAmountEntity extends ContractEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_contract_distribution_amount';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['amount_id', 'contract_id'], 'required'],
            [['sign_average_amount', 'settlement_average_amount', 'receivable_average_amount'], 'number'],
            [['contract_type', 'is_saas'], 'integer'],
            [['input_date', 'modified_on', 'CreatedOn'], 'safe'],
            [['amount_id', 'contract_id', 'user_id', 'area_id', 'department_id', 'CreatedBy'], 'string', 'max' => 36]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'amount_id' => '唯一标记',
            'sign_average_amount' => '签约分摊金额',
            'settlement_average_amount' => '结算分摊金额',
            'receivable_average_amount' => '回款分摊金额',
            'contract_type' => '合同属性，1新增，2增购，3续签',
            'contract_id' => '合同ID',
            'user_id' => '业绩归属人',
            'area_id' => '业绩归属区域',
            'department_id' => '业绩归属部门',
            'CreatedOn' => '添加时间',
            'CreatedBy' => '创建人',
            'input_date' => '合同录入时间',
            'modified_on' => '修改时间',
            'is_saas' => '是否saas，1是0否',
        ];
    }
}